To transfer a large-size file from a sender to a receiver over the internet the file is usually split into several file segments and the segments could be transferred individually. After sending a file segment, the sender monitors segment confirming message sent from the receiver. According to segment identifier included in the segment confirming message, the sender could know which file segment is successfully transferred to the receiver. If the sender fails to receive the segment confirming message of a file segment over a predetermined time period after sending the file segment, the send should resend the file segment, and the predetermined time period is defined as the timeout period of the file transferring process. The timeout period is usually set as a constant value or a dynamic value according to the size of the file segment and average network bandwidth of the internet.
However, if the timeout period is calculated from the size of the file segment and the average network bandwidth of the internet, the timeout period is too small for those networks whose available bandwidth is far lower than the average network bandwidth of the internet. For example, a network quality of a mobile network, especially non-Wi-Fi network (e.g., 2G/3G mobile network) fluctuates sharply and significantly. Thus there may be a big gap between statistical average bandwidth and the actual available bandwidth of a mobile network many times. To let the user know the time out during the file transferring process without waiting a long period, the timeout period is usually not calculated according to a network bandwidth far lower than then the average network bandwidth of the internet. In other words, the timeout period is a relatively small value. Therefore, if the timeout period is employed in a mobile network, the timeout issue would frequently occur as the actual available bandwidth fluctuates to a small value. As a result, a failure rate of file transferring over the mobile network is high.
The timeout period can also be calculated according to the size of the file segment and the recent actual bandwidth. However, the network quality of the mobile networks usually changes discontinuously or in other words; there is usually a bandwidth jump in mobile networks. For example, the bandwidth may decrease to about one-tenth of bandwidth of the current moment immediately. It is difficult to estimate the bandwidth of next moment according to the bandwidth of the current moment. Therefore, the timeout period calculated according to this method also leads to a high failure rate of file transferring over mobile networks.
In addition, the file segment should be resent if the transferring process expires, and the network traffic consumed in the failed transferring process is wasted. Thus, the higher the failure rate of segment transferring is, the more network traffic would be consumed to transfer a same file.